import request from '@neu/biz-core/utils/request'

export const detail = (id) => {
  return request({
    url: '/cmdb/tags/' + id,
    method: 'get'
  })
}

export const update = (id, data) => {
  return request({
    url: '/cmdb/tags/' + id,
    data: data,
    method: 'put'
  })
}

export const create = (data) => {
  return request({
    url: '/cmdb/tags',
    data: data,
    method: 'post'
  })
}

export const remove = (id) => {
  return request({
    url: '/cmdb/tags/' + id,
    method: 'delete'
  })
}

export const addAttrs = (id, attrs) => {
  return request({
    url: '/cmdb/tags/' + id + '/addattrs',
    data: attrs,
    method: 'put'
  })
}
